using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._Raster._Interpolation
{
    /// <summary>
    /// <para>Topo to Raster</para>
    /// <para>Interpolates a hydrologically correct raster surface from point, line, and polygon data.</para>
    /// <para>根据点、线和面数据插值水文正确的栅格表面。</para>
    /// </summary>    
    [DisplayName("Topo to Raster")]
    public class TopoToRaster : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public TopoToRaster()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_topo_features">
        /// <para>Input feature data</para>
        /// <para><xdoc>
        ///   <para>The input features containing the z-values to be interpolated into a surface raster.</para>
        ///   <para>Each feature input can have a field specified that contains the z-values and one of six types specified.</para>
        ///   <bulletList>
        ///     <bullet_item>Feature layer—The input feature dataset.</bullet_item><para/>
        ///     <bullet_item>Field—The name of the field that stores the attributes, where appropriate.</bullet_item><para/>
        ///     <bullet_item>Type—The type of input feature dataset.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>There are nine types of accepted inputs:</para>
        ///   <bulletList>
        ///     <bullet_item>Point elevation—A point feature class representing surface elevations. The Field stores the elevations of the points.</bullet_item><para/>
        ///     <bullet_item>Contour—A line feature class that represents elevation contours. The Field stores the elevations of the contour lines.</bullet_item><para/>
        ///     <bullet_item>Stream—A line feature class of stream locations. All arcs must be oriented to point downstream. The feature class should only contain single arc streams. There is no Field option for this input type.</bullet_item><para/>
        ///     <bullet_item>Sink—A point feature class that represents known topographic depressions. The tool will not attempt to remove from the analysis any points explicitly identified as sinks. The Field used should be one that stores the elevation of the legitimate sink. If NONE is selected, only the location of the sink is used.</bullet_item><para/>
        ///     <bullet_item>Boundary—A feature class containing a single polygon that represents the outer boundary of the output raster. Cells in the output raster outside this boundary will be NoData. This option can be used for clipping out water areas along coastlines before making the final output raster. There is no Field option for this input type.</bullet_item><para/>
        ///     <bullet_item>Lake—A polygon feature class that specifies the location of lakes. All output raster cells within a lake will be assigned to the minimum elevation value of all cells along the shoreline. There is no Field option for this input type.</bullet_item><para/>
        ///     <bullet_item>Cliff—A line feature class of the cliffs. The cliff line features must be oriented so that the left-hand side of the line is on the low side of the cliff and the right-hand side is the high side of the cliff. There is no Field option for this input type.</bullet_item><para/>
        ///     <bullet_item>Exclusion—A polygon feature class of the areas in which the input data should be ignored. These polygons permit removal of elevation data from the interpolation process. This is typically used to remove elevation data associated with dam walls and bridges. This enables interpolation of the underlying valley with connected drainage structure. There is no Field option for this input type.</bullet_item><para/>
        ///     <bullet_item>Coast—A polygon feature class containing the outline of a coastal area. Cells in the final output raster that lie outside these polygons are set to a value that is less than the user-specified minimum height limit. There is no Field option for this input type.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>包含要插值到表面栅格中的 z 值的输入要素。</para>
        ///   <para>每个要素输入都可以指定一个字段，该字段包含 z 值和指定的六种类型之一。</para>
        ///   <bulletList>
        ///     <bullet_item>要素图层 - 输入要素数据集。</bullet_item><para/>
        ///     <bullet_item>字段 - 存储属性的字段的名称（如果适用）。</bullet_item><para/>
        ///     <bullet_item>类型 - 输入要素数据集的类型。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>接受的输入有九种类型：</para>
        ///   <bulletList>
        ///     <bullet_item>点高程 - 表示表面高程的点要素类。字段存储点的高程。</bullet_item><para/>
        ///     <bullet_item>等值线 - 表示高程等值线的线要素类。字段存储等值线的高程。</bullet_item><para/>
        ///     <bullet_item>流 - 流位置的线要素类。所有圆弧都必须指向下游。要素类应仅包含单个弧流。此输入类型没有字段选项。</bullet_item><para/>
        ///     <bullet_item>水槽 - 表示已知地形凹陷的点要素类。该工具不会尝试从分析中删除任何明确标识为汇的点。使用的字段应为存储合法接收器高程的字段。如果选择“无”，则仅使用接收器的位置。</bullet_item><para/>
        ///     <bullet_item>边界 - 包含表示输出栅格外部边界的单个面的要素类。此边界之外的输出栅格中的像元将为 NoData。此选项可用于在制作最终输出栅格之前沿海岸线剪裁水域。此输入类型没有字段选项。</bullet_item><para/>
        ///     <bullet_item>湖泊 - 指定湖泊位置的面要素类。湖泊内的所有输出栅格像元都将分配给沿海岸线的所有像元的最小高程值。此输入类型没有字段选项。</bullet_item><para/>
        ///     <bullet_item>悬崖 - 悬崖的线要素类。悬崖线要素的方向必须使线的左侧位于悬崖的低侧，右侧位于悬崖的高侧。此输入类型没有字段选项。</bullet_item><para/>
        ///     <bullet_item>排除项 - 应忽略输入数据的区域的面要素类。这些面允许从插值过程中移除高程数据。这通常用于移除与坝墙和桥梁相关的高程数据。这样就可以对具有连接排水结构的下层山谷进行插值。此输入类型没有字段选项。</bullet_item><para/>
        ///     <bullet_item>海岸 - 包含沿海地区轮廓的面要素类。最终输出栅格中位于这些面之外的像元将设置为小于用户指定的最小高度限制的值。此输入类型没有字段选项。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_surface_raster">
        /// <para>Output surface raster</para>
        /// <para><xdoc>
        ///   <para>The output interpolated surface raster.</para>
        ///   <para>It is always a floating-point raster.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出插值表面栅格。</para>
        ///   <para>它始终是浮点栅格。</para>
        /// </xdoc></para>
        /// </param>
        public TopoToRaster(object _in_topo_features, object _out_surface_raster)
        {
            this._in_topo_features = _in_topo_features;
            this._out_surface_raster = _out_surface_raster;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "Topo to Raster";

        public override string CallName => "3d.TopoToRaster";

        public override List<string> AcceptEnvironments => ["MDomain", "MResolution", "MTolerance", "XYDomain", "XYResolution", "XYTolerance", "ZDomain", "ZResolution", "ZTolerance", "autoCommit", "cellSize", "cellSizeProjectionMethod", "configKeyword", "extent", "geographicTransformations", "maintainSpatialIndex", "mask", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "scratchWorkspace", "snapRaster", "tileSize", "transferDomains", "workspace"];

        public override object[] ParameterInfo => [_in_topo_features, _out_surface_raster, _cell_size, _extent, _Margin, _minimum_z_value, _maximum_z_value, _enforce.GetGPValue(), _data_type.GetGPValue(), _maximum_iterations, _roughness_penalty, _discrete_error_factor, _vertical_standard_error, _tolerance_1, _tolerance_2, _out_stream_features, _out_sink_features, _out_diagnostic_file, _out_parameter_file, _profile_penalty, _out_residual_feature, _out_stream_cliff_error_feature, _out_contour_error_feature];

        /// <summary>
        /// <para>Input feature data</para>
        /// <para><xdoc>
        ///   <para>The input features containing the z-values to be interpolated into a surface raster.</para>
        ///   <para>Each feature input can have a field specified that contains the z-values and one of six types specified.</para>
        ///   <bulletList>
        ///     <bullet_item>Feature layer—The input feature dataset.</bullet_item><para/>
        ///     <bullet_item>Field—The name of the field that stores the attributes, where appropriate.</bullet_item><para/>
        ///     <bullet_item>Type—The type of input feature dataset.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>There are nine types of accepted inputs:</para>
        ///   <bulletList>
        ///     <bullet_item>Point elevation—A point feature class representing surface elevations. The Field stores the elevations of the points.</bullet_item><para/>
        ///     <bullet_item>Contour—A line feature class that represents elevation contours. The Field stores the elevations of the contour lines.</bullet_item><para/>
        ///     <bullet_item>Stream—A line feature class of stream locations. All arcs must be oriented to point downstream. The feature class should only contain single arc streams. There is no Field option for this input type.</bullet_item><para/>
        ///     <bullet_item>Sink—A point feature class that represents known topographic depressions. The tool will not attempt to remove from the analysis any points explicitly identified as sinks. The Field used should be one that stores the elevation of the legitimate sink. If NONE is selected, only the location of the sink is used.</bullet_item><para/>
        ///     <bullet_item>Boundary—A feature class containing a single polygon that represents the outer boundary of the output raster. Cells in the output raster outside this boundary will be NoData. This option can be used for clipping out water areas along coastlines before making the final output raster. There is no Field option for this input type.</bullet_item><para/>
        ///     <bullet_item>Lake—A polygon feature class that specifies the location of lakes. All output raster cells within a lake will be assigned to the minimum elevation value of all cells along the shoreline. There is no Field option for this input type.</bullet_item><para/>
        ///     <bullet_item>Cliff—A line feature class of the cliffs. The cliff line features must be oriented so that the left-hand side of the line is on the low side of the cliff and the right-hand side is the high side of the cliff. There is no Field option for this input type.</bullet_item><para/>
        ///     <bullet_item>Exclusion—A polygon feature class of the areas in which the input data should be ignored. These polygons permit removal of elevation data from the interpolation process. This is typically used to remove elevation data associated with dam walls and bridges. This enables interpolation of the underlying valley with connected drainage structure. There is no Field option for this input type.</bullet_item><para/>
        ///     <bullet_item>Coast—A polygon feature class containing the outline of a coastal area. Cells in the final output raster that lie outside these polygons are set to a value that is less than the user-specified minimum height limit. There is no Field option for this input type.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>包含要插值到表面栅格中的 z 值的输入要素。</para>
        ///   <para>每个要素输入都可以指定一个字段，该字段包含 z 值和指定的六种类型之一。</para>
        ///   <bulletList>
        ///     <bullet_item>要素图层 - 输入要素数据集。</bullet_item><para/>
        ///     <bullet_item>字段 - 存储属性的字段的名称（如果适用）。</bullet_item><para/>
        ///     <bullet_item>类型 - 输入要素数据集的类型。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>接受的输入有九种类型：</para>
        ///   <bulletList>
        ///     <bullet_item>点高程 - 表示表面高程的点要素类。字段存储点的高程。</bullet_item><para/>
        ///     <bullet_item>等值线 - 表示高程等值线的线要素类。字段存储等值线的高程。</bullet_item><para/>
        ///     <bullet_item>流 - 流位置的线要素类。所有圆弧都必须指向下游。要素类应仅包含单个弧流。此输入类型没有字段选项。</bullet_item><para/>
        ///     <bullet_item>水槽 - 表示已知地形凹陷的点要素类。该工具不会尝试从分析中删除任何明确标识为汇的点。使用的字段应为存储合法接收器高程的字段。如果选择“无”，则仅使用接收器的位置。</bullet_item><para/>
        ///     <bullet_item>边界 - 包含表示输出栅格外部边界的单个面的要素类。此边界之外的输出栅格中的像元将为 NoData。此选项可用于在制作最终输出栅格之前沿海岸线剪裁水域。此输入类型没有字段选项。</bullet_item><para/>
        ///     <bullet_item>湖泊 - 指定湖泊位置的面要素类。湖泊内的所有输出栅格像元都将分配给沿海岸线的所有像元的最小高程值。此输入类型没有字段选项。</bullet_item><para/>
        ///     <bullet_item>悬崖 - 悬崖的线要素类。悬崖线要素的方向必须使线的左侧位于悬崖的低侧，右侧位于悬崖的高侧。此输入类型没有字段选项。</bullet_item><para/>
        ///     <bullet_item>排除项 - 应忽略输入数据的区域的面要素类。这些面允许从插值过程中移除高程数据。这通常用于移除与坝墙和桥梁相关的高程数据。这样就可以对具有连接排水结构的下层山谷进行插值。此输入类型没有字段选项。</bullet_item><para/>
        ///     <bullet_item>海岸 - 包含沿海地区轮廓的面要素类。最终输出栅格中位于这些面之外的像元将设置为小于用户指定的最小高度限制的值。此输入类型没有字段选项。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input feature data")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_topo_features { get; set; }


        /// <summary>
        /// <para>Output surface raster</para>
        /// <para><xdoc>
        ///   <para>The output interpolated surface raster.</para>
        ///   <para>It is always a floating-point raster.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出插值表面栅格。</para>
        ///   <para>它始终是浮点栅格。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output surface raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_surface_raster { get; set; }


        /// <summary>
        /// <para>Output cell size</para>
        /// <para><xdoc>
        ///   <para>The cell size of the output raster that will be created.</para>
        ///   <para>This parameter can be defined by a numeric value or obtained from an existing raster dataset. If the cell size hasn't been explicitly specified as the parameter value, the environment cell size value will be used if specified; otherwise, additional rules will be used to calculate it from the other inputs. See the usage section for more detail.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将创建的输出栅格的像元大小。</para>
        ///   <para>此参数可以由数值定义，也可以从现有栅格数据集中获取。如果尚未将像元大小显式指定为参数值，则在指定的情况下将使用环境像元大小值;否则，将使用其他规则从其他输入计算它。有关详细信息，请参阅用法部分。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output cell size")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _cell_size { get; set; } = null;


        /// <summary>
        /// <para>Output extent</para>
        /// <para><xdoc>
        ///   <para>Extent for the output raster dataset.</para>
        ///   <para>Interpolation will occur out to the x and y limits, and cells outside that extent will be NoData. For best interpolation results along the edges of the output raster, the x and y limits should be smaller than the extent of the input data by at least 10 cells on each side.</para>
        ///   <bulletList>
        ///     <bullet_item>Left—The default is the smallest x coordinate of all inputs.</bullet_item><para/>
        ///     <bullet_item>Bottom—The default is the smallest y coordinate of all inputs.</bullet_item><para/>
        ///     <bullet_item>Right—The default is the largest x coordinate of all inputs.</bullet_item><para/>
        ///     <bullet_item>Top—The default is the largest y coordinate of all inputs.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>The default extent is the largest of all extents of the input feature data.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出栅格数据集的范围。</para>
        ///   <para>插值将发生在 x 和 y 限制之外，超出该范围的单元格将是 NoData。为了沿输出栅格边缘获得最佳插值结果，x 和 y 限制应小于输入数据的范围，每侧至少 10 个像元。</para>
        ///   <bulletList>
        ///     <bullet_item>左 - 默认值为所有输入的最小 x 坐标。</bullet_item><para/>
        ///     <bullet_item>底部 - 默认值为所有输入的最小 y 坐标。</bullet_item><para/>
        ///     <bullet_item>右 - 默认值为所有输入的最大 x 坐标。</bullet_item><para/>
        ///     <bullet_item>顶部 - 默认值为所有输入的最大 y 坐标。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>默认范围是输入要素数据的所有范围中最大的范围。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _extent { get; set; } = null;


        /// <summary>
        /// <para>Margin in cells</para>
        /// <para><xdoc>
        ///   <para>Distance in cells to interpolate beyond the specified output extent and boundary.</para>
        ///   <para>The value must be greater than or equal to 0 (zero). The default value is 20.</para>
        ///   <para>If the Output extent and Boundary feature datasets are the same as the limit of the input data (the default), values interpolated along the edge of the DEM will not match well with adjacent DEM data. This is because they have been interpolated using one-half as much data as the points inside the raster, which are surrounded on all sides by input data. The Margin In Cells option allows input data beyond these limits to be used in the interpolation.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>在单元格中插值超出指定输出范围和边界的距离。</para>
        ///   <para>该值必须大于或等于 0（零）。默认值为 20。</para>
        ///   <para>如果输出范围和边界要素数据集与输入数据的限制相同（默认值），则沿 DEM 边缘插值的值将无法与相邻的 DEM 数据很好地匹配。这是因为它们使用的数据量是栅格内点的一半，栅格内的点四面都被输入数据包围。“单元格中的边距”（Margin In Cells） 选项允许在插值中使用超出这些限制的输入数据。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Margin in cells")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _Margin { get; set; } = 20;


        /// <summary>
        /// <para>Smallest z value to be used in interpolation</para>
        /// <para><xdoc>
        ///   <para>The minimum z-value to be used in the interpolation.</para>
        ///   <para>The default is 20 percent below the smallest of all the input values.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>插值中使用的最小 z 值。</para>
        ///   <para>默认值为所有输入值中最小的值低 20%。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Smallest z value to be used in interpolation")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _minimum_z_value { get; set; } = null;


        /// <summary>
        /// <para>Largest z value to be used in interpolation</para>
        /// <para><xdoc>
        ///   <para>The maximum z-value to be used in the interpolation.</para>
        ///   <para>The default is 20 percent above the largest of all input values.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>插值中使用的最大 z 值。</para>
        ///   <para>默认值比所有输入值中的最大值高 20%。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Largest z value to be used in interpolation")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _maximum_z_value { get; set; } = null;


        /// <summary>
        /// <para>Drainage enforcement</para>
        /// <para><xdoc>
        ///   <para>The type of drainage enforcement to apply.</para>
        ///   <para>The drainage enforcement option can be set to attempt to remove all sinks or depressions so a hydrologically correct DEM can be created. If sink points have been explicitly identified in the input feature data, these depressions will not be filled.</para>
        ///   <bulletList>
        ///     <bullet_item>Enforce—The algorithm will attempt to remove all sinks it encounters, whether they are real or spurious. This is the default.</bullet_item><para/>
        ///     <bullet_item>Do not enforce—No sinks will be filled.</bullet_item><para/>
        ///     <bullet_item>Enforce with sink—Points identified as sinks in Input feature data represent known topographic depressions and will not be altered. Any sink not identified in input feature data is considered spurious, and the algorithm will attempt to fill it.Having more than 8,000 spurious sinks causes the tool to fail.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要应用的排水执法类型。</para>
        ///   <para>可以将排水强制选项设置为尝试移除所有汇或洼地，以便创建水文正确的 DEM。如果已在输入要素数据中显式标识了接收点，则不会填充这些凹陷。</para>
        ///   <bulletList>
        ///     <bullet_item>强制 - 算法将尝试删除它遇到的所有接收器，无论它们是真实的还是虚假的。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>不强制执行 - 不会填充任何接收器。</bullet_item><para/>
        ///     <bullet_item>使用接收器强制执行 - 在输入要素数据中标识为接收器的点表示已知的地形凹陷，并且不会更改。任何未在输入要素数据中标识的接收器都被视为虚假接收器，算法将尝试填充它。拥有 8,000 多个杂散接收器会导致工具失效。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Drainage enforcement")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _enforce_value _enforce { get; set; } = _enforce_value._ENFORCE;

        public enum _enforce_value
        {
            /// <summary>
            /// <para>Enforce</para>
            /// <para>Enforce—The algorithm will attempt to remove all sinks it encounters, whether they are real or spurious. This is the default.</para>
            /// <para>强制 - 算法将尝试删除它遇到的所有接收器，无论它们是真实的还是虚假的。这是默认设置。</para>
            /// </summary>
            [Description("Enforce")]
            [GPEnumValue("ENFORCE")]
            _ENFORCE,

            /// <summary>
            /// <para>Do not enforce</para>
            /// <para>Do not enforce—No sinks will be filled.</para>
            /// <para>不强制执行 - 不会填充任何接收器。</para>
            /// </summary>
            [Description("Do not enforce")]
            [GPEnumValue("NO_ENFORCE")]
            _NO_ENFORCE,

            /// <summary>
            /// <para>Enforce with sink</para>
            /// <para>Enforce with sink—Points identified as sinks in Input feature data represent known topographic depressions and will not be altered. Any sink not identified in input feature data is considered spurious, and the algorithm will attempt to fill it.Having more than 8,000 spurious sinks causes the tool to fail.</para>
            /// <para>使用接收器强制执行 - 在输入要素数据中标识为接收器的点表示已知的地形凹陷，并且不会更改。任何未在输入要素数据中标识的接收器都被视为虚假接收器，算法将尝试填充它。拥有 8,000 多个杂散接收器会导致工具失效。</para>
            /// </summary>
            [Description("Enforce with sink")]
            [GPEnumValue("ENFORCE_WITH_SINK")]
            _ENFORCE_WITH_SINK,

        }

        /// <summary>
        /// <para>Primary type of input data</para>
        /// <para><xdoc>
        ///   <para>The dominant elevation data type of the input feature data.</para>
        ///   <bulletList>
        ///     <bullet_item>Contour—The dominant type of input data will be elevation contours. This is the default.</bullet_item><para/>
        ///     <bullet_item>Spot—The dominant type of input will be point.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>Specifying the relevant selection optimizes the search method used during the generation of streams and ridges.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输入要素数据的主要高程数据类型。</para>
        ///   <bulletList>
        ///     <bullet_item>等值线—输入数据的主要类型为高程等值线。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>点—输入的主要类型为点。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>指定相关选择可优化生成溪流和山脊期间使用的搜索方法。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Primary type of input data")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _data_type_value _data_type { get; set; } = _data_type_value._CONTOUR;

        public enum _data_type_value
        {
            /// <summary>
            /// <para>Contour</para>
            /// <para>Contour—The dominant type of input data will be elevation contours. This is the default.</para>
            /// <para>等值线—输入数据的主要类型为高程等值线。这是默认设置。</para>
            /// </summary>
            [Description("Contour")]
            [GPEnumValue("CONTOUR")]
            _CONTOUR,

            /// <summary>
            /// <para>Spot</para>
            /// <para>Spot—The dominant type of input will be point.</para>
            /// <para>点—输入的主要类型为点。</para>
            /// </summary>
            [Description("Spot")]
            [GPEnumValue("SPOT")]
            _SPOT,

        }

        /// <summary>
        /// <para>Maximum number of iterations</para>
        /// <para><xdoc>
        ///   <para>The maximum number of interpolation iterations.</para>
        ///   <para>The number of iterations must be greater than zero. A default of 20 is normally adequate for both contour and line data.</para>
        ///   <para>A value of 30 will clear fewer sinks. Rarely, higher values (45–50) may be useful to clear more sinks or to set more ridges and streams. Iteration ceases for each grid resolution when the maximum number of iterations has been reached.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>插值迭代的最大次数。</para>
        ///   <para>迭代次数必须大于零。对于等值线和线数据，默认值 20 通常就足够了。</para>
        ///   <para>值为 30 将清除较少的接收器。在极少数情况下，较高的值 （45-50） 可能有助于清除更多的汇或设置更多的山脊和溪流。当达到最大迭代次数时，每个网格分辨率的迭代将停止。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum number of iterations")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _maximum_iterations { get; set; } = 20;


        /// <summary>
        /// <para>Roughness penalty</para>
        /// <para><xdoc>
        ///   <para>The integrated squared second derivative as a measure of roughness.</para>
        ///   <para>The roughness penalty must be zero or greater. If the primary input data type is Contour, the default is zero. If the primary data type is Spot, the default is 0.5. Larger values are not normally recommended.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>积分平方二阶导数作为粗糙度的度量。</para>
        ///   <para>粗糙度损失必须为零或更大。如果主输入数据类型为 Contour，则默认值为零。如果主数据类型为 Spot，则默认值为 0.5。通常不建议使用更大的值。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Roughness penalty")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _roughness_penalty { get; set; } = null;


        /// <summary>
        /// <para>Discretisation error factor</para>
        /// <para><xdoc>
        ///   <para>The discrete error factor is used to adjust the amount of smoothing when converting the input data to a raster.</para>
        ///   <para>The value must be greater than zero. The normal range of adjustment is 0.25 to 4, and the default is 1. A smaller value results in less data smoothing; a larger value causes greater smoothing.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>离散误差因子用于调整将输入数据转换为栅格时的平滑量。</para>
        ///   <para>该值必须大于零。正常调整范围为 0.25 到 4，默认值为 1。值越小，数据平滑度越低;值越大，平滑度越大。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Discretisation error factor")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _discrete_error_factor { get; set; } = 1;


        /// <summary>
        /// <para>Vertical standard error</para>
        /// <para><xdoc>
        ///   <para>The amount of random error in the z-values of the input data.</para>
        ///   <para>The value must be zero or greater. The default is zero.</para>
        ///   <para>The vertical standard error may be set to a small positive value if the data has significant random (non-systematic) vertical errors with uniform variance. In this case, set the vertical standard error to the standard deviation of these errors. For most elevation datasets, the vertical error should be set to zero, but it may be set to a small positive value to stabilize convergence when rasterizing point data with stream line data.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输入数据的 z 值中的随机误差量。</para>
        ///   <para>该值必须为零或更大。默认值为零。</para>
        ///   <para>如果数据具有显著的随机（非系统）垂直误差且方差均匀，则垂直标准误差可以设置为较小的正值。在这种情况下，将垂直标准误差设置为这些误差的标准差。对于大多数高程数据集，垂直误差应设置为零，但在使用流线数据栅格化点数据时，可以将其设置为一个小的正值以稳定收敛性。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Vertical standard error")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _vertical_standard_error { get; set; } = 0;


        /// <summary>
        /// <para>Tolerance 1</para>
        /// <para><xdoc>
        ///   <para>This tolerance reflects the accuracy and density of the elevation points in relation to surface drainage.</para>
        ///   <para>For point datasets, set the tolerance to the standard error of the data heights. For contour datasets, use one-half the average contour interval.</para>
        ///   <para>The value must be zero or greater. The default is 2.5 if the data type is Contour and zero if the data type is Spot.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>该公差反映了高程点相对于地表排水的精度和密度。</para>
        ///   <para>对于点数据集，将容差设置为数据高度的标准误差。对于等值线数据集，请使用平均等值线间隔的一半。</para>
        ///   <para>该值必须为零或更大。如果数据类型为 Contour，则默认值为 2.5，如果数据类型为 Spot，则默认值为 0。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Tolerance 1")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _tolerance_1 { get; set; } = null;


        /// <summary>
        /// <para>Tolerance 2</para>
        /// <para><xdoc>
        ///   <para>This tolerance prevents drainage clearance through unrealistically high barriers.</para>
        ///   <para>The value must be greater than zero. The default is 100 if the data type is Contour and 200 if the data type is Spot.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>这种公差可防止排水通过不切实际的高障碍物。</para>
        ///   <para>该值必须大于零。如果数据类型为 Contour，则默认值为 100，如果数据类型为 Spot，则默认值为 200。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Tolerance 2")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _tolerance_2 { get; set; } = null;


        /// <summary>
        /// <para>Output stream polyline features</para>
        /// <para><xdoc>
        ///   <para>The output line feature class of stream polyline features and ridge line features.</para>
        ///   <para>The line features are created at the beginning of the interpolation process. It provides the general morphology of the surface for interpolation. It can be used to verify correct drainage and morphology by comparing known stream and ridge data.</para>
        ///   <para>The polyline features are coded as follows:</para>
        ///   <para>1. Input stream line not over cliff.</para>
        ///   <para>2. Input stream line over cliff (waterfall).</para>
        ///   <para>3. Drainage enforcement clearing a spurious sink.</para>
        ///   <para>4. Stream line determined from contour corner.</para>
        ///   <para>5. Ridge line determined from contour corner.</para>
        ///   <para>6. Code not used.</para>
        ///   <para>7. Data stream line side conditions.</para>
        ///   <para>8. Code not used.</para>
        ///   <para>9. Line indicating large elevation data clearance.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>流折线要素和脊线要素的输出线要素类。</para>
        ///   <para>线要素是在插值过程开始时创建的。它提供了用于插值的曲面的一般形态。它可用于通过比较已知的溪流和山脊数据来验证正确的排水和形态。</para>
        ///   <para>折线要素的编码如下：</para>
        ///   <para>1.输入流线不越过悬崖。</para>
        ///   <para>2.悬崖（瀑布）上的输入溪流线。</para>
        ///   <para>3. 排水执法清理虚假水槽。</para>
        ///   <para>4. 从等高线角确定的流线。</para>
        ///   <para>5. 从等高线角确定的脊线。</para>
        ///   <para>6. 未使用代码。</para>
        ///   <para>7.数据流线侧条件。</para>
        ///   <para>8. 未使用代码。</para>
        ///   <para>9. 表示大高程数据间隙的线。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output stream polyline features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_stream_features { get; set; } = null;


        /// <summary>
        /// <para>Output remaining sink point features</para>
        /// <para><xdoc>
        ///   <para>The output point feature class of the remaining sink point features.</para>
        ///   <para>These are the sinks that were not specified in the sink input feature data and were not cleared during drainage enforcement. Adjusting the values of the tolerances, Tolerance 1 and Tolerance 2, can reduce the number of remaining sinks. Remaining sinks often indicate errors in the input data that the drainage enforcement algorithm could not resolve. This can be an efficient way of detecting subtle elevation errors.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>其余接收点要素的输出点要素类。</para>
        ///   <para>这些是未在汇输入要素数据中指定的汇，并且在排水强制执行期间未清除。调整公差值（公差 1 和公差 2）可以减少剩余的接收量。剩余的汇通常表示输入数据中的错误，排水强制算法无法解决。这可能是检测细微高程误差的有效方法。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output remaining sink point features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_sink_features { get; set; } = null;


        /// <summary>
        /// <para>Output diagnostic file</para>
        /// <para>The output diagnostic file listing all inputs and parameters used and the number of sinks cleared at each resolution and iteration.</para>
        /// <para>输出诊断文件，其中列出了使用的所有输入和参数，以及在每次分辨率和迭代时清除的接收器数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output diagnostic file")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_diagnostic_file { get; set; } = null;


        /// <summary>
        /// <para>Output parameter file</para>
        /// <para>The output parameter file listing all inputs and parameters used, which can be used with Topo to Raster by File to run the interpolation again.</para>
        /// <para>列出所有使用的输入和参数的输出参数文件，可将其与“地形到按文件栅格”一起使用以再次运行插值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output parameter file")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_parameter_file { get; set; } = null;


        /// <summary>
        /// <para>Profile curvature roughness penalty</para>
        /// <para><xdoc>
        ///   <para>The profile curvature roughness penalty is a locally adaptive penalty that can be used to partly replace total curvature.</para>
        ///   <para>It can yield good results with high-quality contour data but can lead to instability in convergence with poor data. Set to 0.0 for no profile curvature (the default), set to 0.5 for moderate profile curvature, and set to 0.8 for maximum profile curvature. Values larger than 0.8 are not recommended and should not be used.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>轮廓曲率粗糙度惩罚是一种局部自适应惩罚，可用于部分替换总曲率。</para>
        ///   <para>它可以通过高质量的等值线数据产生良好的结果，但可能导致收敛不稳定，数据较差。设置为 0.0 表示无轮廓曲率（默认值），设置为 0.5 表示中等轮廓曲率，设置为 0.8 表示最大轮廓曲率。不建议使用大于 0.8 的值，也不应使用。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Profile curvature roughness penalty")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _profile_penalty { get; set; } = null;


        /// <summary>
        /// <para>Output residual point features</para>
        /// <para><xdoc>
        ///   <para>The output point feature class of all the large elevation residuals as scaled by the local discretisation error.</para>
        ///   <para>All the scaled residuals larger than 10 should be inspected for possible errors in input elevation and stream data. Large-scaled residuals indicate conflicts between input elevation data and streamline data. These may also be associated with poor automatic drainage enforcements. These conflicts can be remedied by providing additional streamline and/or point elevation data after first checking and correcting errors in existing input data. Large unscaled residuals usually indicate input elevation errors.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>所有大高程残差的输出点要素类，按局部离散化误差进行缩放。</para>
        ///   <para>应检查所有大于 10 的缩放残差，以查找输入高程和流数据中可能存在的错误。大比例残差表示输入高程数据与流线数据之间存在冲突。这些也可能与自动排水执法不力有关。在首次检查和更正现有输入数据中的错误后，可以通过提供额外的流线和/或点高程数据来补救这些冲突。较大的未缩放残差通常表示输入高程误差。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output residual point features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_residual_feature { get; set; } = null;


        /// <summary>
        /// <para>Output stream and cliff error point features</para>
        /// <para><xdoc>
        ///   <para>The output point feature class of locations where possible stream and cliff errors occur.</para>
        ///   <para>The locations where the streams have closed loops, distributaries, and streams over cliffs can be identified from the point feature class. Cliffs with neighboring cells that are inconsistent with the high and low sides of the cliff are also indicated. This can be a good indicator of cliffs with incorrect direction.</para>
        ///   <para>Points are coded as follows:</para>
        ///   <para>1. True circuit in data streamline network.</para>
        ///   <para>2. Circuit in stream network as encoded on the out raster.</para>
        ///   <para>3. Circuit in stream network via connecting lakes.</para>
        ///   <para>4. Distributaries point.</para>
        ///   <para>5. Stream over a cliff (waterfall).</para>
        ///   <para>6. Points indicating multiple stream outflows from lakes.</para>
        ///   <para>7. Code not used.</para>
        ///   <para>8. Points beside cliffs with heights inconsistent with cliff direction.</para>
        ///   <para>9. Code not used.</para>
        ///   <para>10. Circular distributary removed.</para>
        ///   <para>11. Distributary with no inflowing stream.</para>
        ///   <para>12. Rasterized distributary in output cell different to where the data stream line distributary occurs.</para>
        ///   <para>13. Error processing side conditions—an indicator of very complex streamline data.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>可能发生溪流和悬崖错误的位置的输出点要素类。</para>
        ///   <para>可以从点要素类中识别溪流具有闭环、支流和悬崖上的溪流的位置。还标明了与悬崖高边和低边不一致的相邻单元的悬崖。这可能是方向不正确的悬崖的一个很好的指标。</para>
        ///   <para>点的编码如下：</para>
        ///   <para>1.数据流线网络中的真实电路。</para>
        ///   <para>2. 在输出栅格上编码的流网络中的电路。</para>
        ///   <para>3.通过连接湖泊的溪流网络电路。</para>
        ///   <para>4.分流点。</para>
        ///   <para>5.在悬崖（瀑布）上溪流。</para>
        ///   <para>6. 指示湖泊多条溪流流出的点。</para>
        ///   <para>7. 未使用代码。</para>
        ///   <para>8. 悬崖旁高度与悬崖方向不一致的点。</para>
        ///   <para>9. 未使用代码。</para>
        ///   <para>10.去掉了循环分流。</para>
        ///   <para>11.无流入的支流。</para>
        ///   <para>12. 输出单元中的栅格化分配点与数据流线分配点发生的位置不同。</para>
        ///   <para>13. 错误处理侧条件 - 非常复杂的流线型数据的指标。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output stream and cliff error point features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_stream_cliff_error_feature { get; set; } = null;


        /// <summary>
        /// <para>Output contour error point features</para>
        /// <para><xdoc>
        ///   <para>The output point feature class of possible errors pertaining to the input contour data.</para>
        ///   <para>Contours with bias in height exceeding five times the standard deviation of the contour values as represented on the output raster are reported to this feature class. Contours that join other contours with a different elevation are flagged in this feature class by the code 1; this is a sure sign of a contour label error.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>与输入等值线数据相关的可能误差的输出点要素类。</para>
        ///   <para>高度偏差超过输出栅格上表示的等值线值标准差 5 倍的等值线将报告到此要素类。在此要素类中，连接具有不同高程的其他等值线的等值线由代码 1 标记;这是等值线标签错误的明确迹象。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output contour error point features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_contour_error_feature { get; set; } = null;


        public TopoToRaster SetEnv(object MDomain = null, object MResolution = null, object MTolerance = null, object XYDomain = null, object XYResolution = null, object XYTolerance = null, object ZDomain = null, object ZResolution = null, object ZTolerance = null, int? autoCommit = null, object cellSize = null, object configKeyword = null, object extent = null, object geographicTransformations = null, bool? maintainSpatialIndex = null, object mask = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, bool? transferDomains = null, object workspace = null)
        {
            base.SetEnv(MDomain: MDomain, MResolution: MResolution, MTolerance: MTolerance, XYDomain: XYDomain, XYResolution: XYResolution, XYTolerance: XYTolerance, ZDomain: ZDomain, ZResolution: ZResolution, ZTolerance: ZTolerance, autoCommit: autoCommit, cellSize: cellSize, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, maintainSpatialIndex: maintainSpatialIndex, mask: mask, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, transferDomains: transferDomains, workspace: workspace);
            return this;
        }

    }

}